import { requestClient } from '#/api/request';


//查询 
export async function getCertifiedListApi(params: any) {
  return requestClient.get('/certification/get-certification-info', { params });
}

//新增
export async function createCertificateInfoApi(data: any) {
  return requestClient.post('/certification/create-certification-info', data);
}

// 编辑
export async function updateCertificateInfoApi(data: any) {
  return requestClient.patch('/certification/update-certification-info', data);
}

//删除
export async function deleteCertificateInfoApi(id: any) {
  return requestClient.delete(`/certification/delete-certification-info/${id}`);
}

//获取证书
export async function getCertifiedApi(data: any) {
  return requestClient.post('/certification/get-user-certificate', data);
}

//获取个人证书
export async function getMyselfCertifiedApi(params: any) {
  return requestClient.get('/certification/get-myself-certificate', { params });
}

//获取用户证书（个人中心）
export async function getUserCertificateForPersonCenterApi(params: any) {
  return requestClient.get('/certification/get-user-certificate-for-personCenter', { params });
}

//获取课程目录
export async function getCourseDirectory(params: any) {
  return requestClient.get('/course/get-course-directory', { params })
}

// 获取首页配置
export async function getCertificateFirstPageApi(params: any) {
  return requestClient.get('/certification/display-certificate-first-page', { params })
}

// 保存首页配置
export async function createCertificateFirstPageApi(data: any) {
  return requestClient.post('/certification/create-certificate-first-page', data)
}

// 客户端获取首页配置
export async function getCertificateFirstPageForClientApi(params: any) {
  return requestClient.get('/certification/show-certificate-first-page', { params })
}
